<?php

class Core_NoSQL_Memcache extends Memcache {
	
	/**
	 * Get multi keys
	 * @param array $keys
	 * @return array
	 */
	public function getMulti(array $keys)
	{
		$result = array();
		
		foreach($keys as $key)
		{
			if($this->get($key))
				$result[$key] = $this->get($key);
		}
		
		return $result;
	}

	public function setMulti(array $items,$exprise = 6000){
		foreach($items as $item){
			$this->set($item['key'],$item['value'],time()+$exprise);
		}
	}
	
	public function deleteMulti(array $keys){
		foreach($keys as $key){
			$this->delete($key);
		}
	}
}